package com.wkck.controller;

import com.wkck.service.DeliveredLibraryService;
import com.wkck.utils.Code;
import com.wkck.utils.Msg;
import com.wkck.utils.Result;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/dls")
public class DeliveredLibraryController {

    @Resource
    private DeliveredLibraryService dls;

    @DeleteMapping("/deleteResume/{id}")
    public Result deleteResumeById(@PathVariable Integer id){
        boolean b = dls.removeById(id);
        Integer code = b ? Code.DELETE_OK : Code.DELETE_ERR;
        String msg = b ? Msg.DELETE_OK : Msg.DELETE_ERR;
        return new Result(code,b,msg);
    }
}
